class SmsController < ApplicationController
  
  layout 'base.html'
  # admin
  before_filter :authorize_for_admin      
  
  def resend
    Sm.find(params[:id]).waiting!
    render :text => :success, :status => 200
  end
  
  def destroy
    Sm.find(params[:id]).destroy
    render :text => :success, :status => 200
  end
  
  def index
    case params[:when]
    when 'today'
      @sms = Sm.paginate :conditions => [
        'created_at like ? ',        
      ]
    end
    respond_to do |format|
      format.html do        
        @seo_title = "麦吐司网-短消息"
        @seo_keywords = @seo_title
        @seo_description = @seo_title
      end            
      format.js do 
        render :layout => false
      end
    end
  end
  
end
